package com.aaa.service.impl;

import com.aaa.entity.Melody;
import com.aaa.mapper.MelodyMapper;
import com.aaa.service.MelodyService;
import com.aaa.util.DefaultMsg;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class MelodyServiceImpl implements MelodyService {
    @Resource
    private MelodyMapper melodyMapper;
    @Override
    public DefaultMsg listAllMelody(String keyword) {
        List<Melody> melodies = melodyMapper.listAllMelody(keyword);
        DefaultMsg defaultMsg = new DefaultMsg();
        defaultMsg.setTarget(melodies);
        return defaultMsg;
    }
    @Override
    public List<Melody> melodselecthxl(String pramykey, Integer pid) {
        return melodyMapper.melodselecthxl(pramykey,pid);
    }
}
